#include "Unordered_map.h"
#include "Unordered_set.h"

class Date
{
public:
	struct DateHashFunc
	{
		size_t operator()(const Date& d)
		{
			return (d._year * 31 + d._month) * 31 + d._day;
		}
	};
	Date(const int& year = 1900,const int& mon = 1,const int& day = 1)
		:_year(year)
		,_month(mon)
		,_day(day)
	{}
	bool operator==(const Date& d) const
	{
		return _year == d._year && _day == d._day && _month == d._month;
	}
private:
	int _year;
	int _month;
	int _day;
};
void test_mapdate()
{
	unordered_set<Date, Date::DateHashFunc> stdate;
	stdate.insert({ 2024,7,30 });
	stdate.insert({ 2024,7,31 });
	stdate.insert({ 2024,7,32 });
	stdate.insert({ 2024,7,33 });
}
int main()
{
	//test_map2();
	//test_set();
	test_mapdate();
	return 0;
}